const { switchVersion, loadModule } = require("./utils")

const Vue = loadModule("vue")

if (!Vue || typeof Vue.version !== "string") {
    console.warn("Vue is not found")
}

if (Vue.version.startsWith("2.7.")) {
    switchVersion(2.7)
} else if (Vue.version.startsWith("2.")) {
    switchVersion(2)
} else if (Vue.version.startsWith("3.")) {
    switchVersion(3)
} else {
    console.warn(`unknown version ${Vue.version}`)
}
